/** layuiAdmin.std-v1.4.0 LPPL License By https://www.layui.com/admin/ */
layui.extend({admin: "admin"}).define(["admin"], function (a) {
    let i = layui.element, n = layui.admin, t = n.tabsPage, r = layui.$,
        s = "#LAY_app_body", o = "layadmin-layout-tabs"
    let l = function (a, d) {
        let l, u = r("#LAY_app_tabsheader>li")
        u.each(function (e) {
            let i = r(this), n = i.attr("lay-id");
            if (n === a && !l) {
                l = n
                t.index = e
            }
        });
        if (!l) {
            r(s).append(['<div class="layadmin-tabsbody-item layui-show">', '<iframe src="' + __basePath + a + '" frameborder="0"  scrolling="auto" class="layadmin-iframe" name="'+d+'" id="' + a + '"  tab="tab"></iframe>', "</div>"].join(""))
            t.index = u.length, i.tabAdd(o, {title: "<span>" + d + "</span>", id: a});
        }
        i.tabChange(o, a);
        n.tabsBodyChange(t.index, {url: a, text: d})
    };

    a("center", {openTabsPage: l})
});
